﻿/*
 * 2023/4/4
 * 购物车的DTO
 * **/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.Ph5_2009A.NewShopping.DTO
{
    /// <summary>
    /// 购物车的DTO
    /// </summary>
    public class ShoppingCarDto
    {
        /*
         * 必不可少的四个字段
         * **/
        /// <summary>
        /// 商品ID
        /// </summary>
        [Required(ErrorMessage ="商品ID不可以空")]
        public string GoodsId { get; set; }

        [Required(ErrorMessage = "商品数量不可以空")]
        public int GoodsNumber { get; set; }

        [Required(ErrorMessage = "商品的价格不可以空")]
        public decimal GoodsPrice { get; set; }

        [Required(ErrorMessage = "会员用户不可以空")]
        public string MemberId { get; set; }

        /*
         * 可扩展的（解决冗余问题）
         * **/
        public string? GoodsImage { get; set; }
        public string? StoreName { get; set; }
        public string? GoodsName { get; set; }
    }
}
